<?php
namespace app\model\money;

use think\Model;

class TypeModel extends Model
{
    protected $name = 'money_type';
    protected $pk = 'id';

    public static function getEnglishById($id) {
        if ($id == "0") return "*";
        return self::where("id",$id)->value("english");
    }

    public static function isExist($name) {
        if (self::where('english',$name)->count() < 1) return false;
        else return true;
    }
}